import { lazy } from "react";
import {
    AppOutline,
    MessageOutline,
    MessageFill,
    UnorderedListOutline,
    UserOutline,
} from 'antd-mobile-icons'
let Home = lazy(() => import('../Pages/home/Index'))
let Login = lazy(() => import('../Pages/login/Index'))
let My = lazy(() => import('../Pages/my/Index'))
let Mainout = lazy(() => import('../Pages/mainout/Index'))
let Fenl = lazy(() => import('../Pages/fenl/Index'))
let Zhuc = lazy(() => import('../Pages/zhuc/Index'))
let Qita = lazy(() => import('../Pages/qita/Index'))
let Seacher = lazy(() => import('../Pages/seacher/Index'))
let Map = lazy(() => import('../Pages/map/Index'))
let Errot = lazy(() => import('../Pages/404/Index'))


export const homeRouter = [
    {
        path: '/',
        element: <Home></Home>,
        title: '首页',
        icon: <AppOutline></AppOutline>
    },
    {
        path: '/fenl',
        element: <Fenl></Fenl>,
        title: '分类',
        icon: <UnorderedListOutline></UnorderedListOutline>
    },
    {
        path: '/qita',
        element: <Qita></Qita>,
        title: '其他',
        icon: <MessageOutline></MessageOutline>
    },
    {
        path: '/my',
        element: <My></My>,
        title: '我的',
        icon: <UserOutline></UserOutline>
    },
]

export const routers = [
    {
        path: '/',
        element: <Mainout></Mainout>,
        children: homeRouter
    },
    {
        path: '/login',
        element: <Login></Login>
    },
    {
        path: '/zhuc',
        element: <Zhuc></Zhuc>
    },
    {
        path: '/seacher',
        element: <Seacher></Seacher>
    },
    {
        path: '/map',
        element: <Map></Map>
    },
    {
        path: '*',
        element: <Errot></Errot>
    },
]